Add sinks to benchmarks to prevent smart tools eliminating benchmarked code#1040
Merged
osa1 merged 1 commit intogoogle:masterfrom Aug 22, 2025
Merged
Add sinks to benchmarks to prevent smart tools eliminating benchmarked code#1040osa1 merged 1 commit intogoogle:masterfrom
osa1 merged 1 commit intogoogle:masterfrom
Conversation
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
mraleph
approved these changes
Aug 22, 2025
Spiritus2424
pushed a commit
to EXFO/protobuf.dart
that referenced
this pull request
Aug 28, 2025
…d code (google#1040) In `binary_decode_packed` benchmarks we used "sink" variables to write the decoded values, and printed these sinks at the end to make sure they're not dropped. Do the same in the rest of the benchmarks to make sure no code is eliminated by a sufficiently smart compiler or VM. Just as a sanity check I compared the numbers before and after this change, when compiled to Wasm with `-O2`. The numbers do not change in a consistent (reproducible) and significant way. It's still good to be safe and use the benchmark results to avoid dropping code.
Spiritus2424
pushed a commit
to EXFO/protobuf.dart
that referenced
this pull request
Aug 28, 2025
…d code (google#1040) In `binary_decode_packed` benchmarks we used "sink" variables to write the decoded values, and printed these sinks at the end to make sure they're not dropped. Do the same in the rest of the benchmarks to make sure no code is eliminated by a sufficiently smart compiler or VM. Just as a sanity check I compared the numbers before and after this change, when compiled to Wasm with `-O2`. The numbers do not change in a consistent (reproducible) and significant way. It's still good to be safe and use the benchmark results to avoid dropping code.
copybara-service bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Aug 28, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`. ecosystem (https://github.com/dart-lang/ecosystem/compare/68ff911..fd28be2): fd28be2 2025-08-27 Moritz Dont show warnings by default (dart-lang/ecosystem#365) http (https://github.com/dart-lang/http/compare/6656f15..ef05b37): ef05b37 2025-08-27 Brian Quinlan [cupertino_http]: Switch to ffigen 19.1.0 (dart-lang/http#1811) i18n (https://github.com/dart-lang/i18n/compare/6a8f9c7..9a211d1): 9a211d14 2025-08-27 Moritz [package:intl4x] `DateTime` formatting redesign (dart-lang/i18n#1003) protobuf (https://github.com/dart-lang/protobuf/compare/6e9c9f4..765ba8a): 765ba8a 2025-08-28 Ömer Sinan Ağacan Fix non-proto3 JSON format double decoding (google/protobuf.dart#1043) 703bf7c 2025-08-27 Ömer Sinan Ağacan Compile dart2wasm benchmarks with --no-strip-wasm (google/protobuf.dart#1044) 9939965 2025-08-26 Ömer Sinan Ağacan Fix JS interop annotations (google/protobuf.dart#1042) da354a2 2025-08-22 Ömer Sinan Ağacan Update benchmark builder to use -O2 with dart2wasm, add output dir to gitignore (google/protobuf.dart#1041) 41eba19 2025-08-22 Ömer Sinan Ağacan Add sinks to benchmarks to prevent smart tools eliminating benchmarked code (google/protobuf.dart#1040) 3ccc8ab 2025-08-19 dependabot[bot] Bump actions/checkout from 3.5.3 to 4.2.2 (google/protobuf.dart#1036) 6bce9d7 2025-08-19 Ömer Sinan Ağacan Fix unknown enum handling (google/protobuf.dart#853) 19e5a25 2025-08-15 Ömer Sinan Ağacan Implement deepCopy as copying, instead of merge (google/protobuf.dart#742) web (https://github.com/dart-lang/web/compare/ee9733f..e7895bd): e7895bd 2025-08-27 Nikechukwu [interop] Add Support for Declaration Merging and Overloading (dart-lang/web#449) webdev (https://github.com/dart-lang/webdev/compare/9724fea..a7d3d2f): a7d3d2fc 2025-08-27 Ben Konyi [ DWDS ] Fix issue where null was repeatedly sent to connected clients (dart-lang/webdev#2678) e3009dfb 2025-08-27 Nate Biggs Remove stale calls to dartSdkIsAtLeast. (dart-lang/webdev#2677) e0d58082 2025-08-26 Nate Biggs Fix expectation in test accessing private field. (dart-lang/webdev#2676) Change-Id: Ia98a8f065830865f6922ca032939380683645d72 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447640 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Auto-Submit: Devon Carew <devoncarew@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
binary_decode_packedbenchmarks we used "sink" variables to write the decoded values, and printed these sinks at the end to make sure they're not dropped.Do the same in the rest of the benchmarks to make sure no code is eliminated by a sufficiently smart compiler or VM.
Just as a sanity check I compared the numbers before and after this change, when compiled to Wasm with
-O2. The numbers do not change in a consistent (reproducible) and significant way. It's still good to be safe and use the benchmark results to avoid dropping code.